package main

import (
	"fmt"
	"time"
)

func main() {

	go printNumbers()
	go printAlphabet()
	time.Sleep(3000 * time.Millisecond)

	/**
	运行结果是 1 a 2 3 b 4 c 5 d e

	*/

}

func printNumbers() {
	for i := 1; i <= 5; i++ {
		time.Sleep(250 * time.Millisecond)
		fmt.Printf("%d ", i)
	}
}

func printAlphabet() {
	for i := 'a'; i <= 'e'; i++ {
		time.Sleep(400 * time.Millisecond)
		fmt.Printf("%c ", i)
	}
}
